package com.spring.zy.controller;

import com.spring.zy.model.DateConvert;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/rests")
public class RestsController {
    private DateConvert dateConvert;

    public DateConvert getDateConvert() {
        return dateConvert;
    }

    public void setDateConvert(DateConvert dateConvert) {
        this.dateConvert = dateConvert;
    }

    /*  @RequestMapping("/a")
        public String a(String name,Integer age){

            Animal animal = new Animal();
            animal.setName(name);
            animal.setAge(age);
            System.out.println(name);
            String a = JSON.toJSONStringWithDateFormat(animal, "yyyy-MM-dd");
            return "ok";
        }*/
    @RequestMapping("/date")
    public String date(Date date){
        System.out.println(date);
        return "success";
    }
}
